package cn.smile.service.impl;

import cn.smile.dao.RoleDaoMapper;
import cn.smile.pojo.User;
import cn.smile.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: MaoSuyu
 * @User：John
 * @Date: 2019/7/4
 * @Time: 19:50
 * @Description: No Description
 */
@Service
@Transactional
public class RoleServiceImpl implements RoleService {

    @Autowired
    private RoleDaoMapper roleDaoMapper;

    @Override
    public List<String> findRoleById(User user) {
        return roleDaoMapper.selectRoleById(user);
    }

    @Override
    public List<String> findAll() {
        return roleDaoMapper.selectAll();
    }
}
